<template>
    <a-form @finish="handleFinish" :model="form" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }"
        autocomplete="off" style="width: 1000px;">

        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="项目编号" name="proCode" :rules="[{ required: true }]">
                    <a-input v-model:value="form.proCode" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>

            <a-col :span="12">
                <a-form-item label="项目名称" name="proName">
                    <a-input v-model:value="form.proName" disabled style="width: 100%" placeholder="请选择项目" 
                         />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="项目类型" name="bidType" :rules="[{ required: true }]">
                    <a-select :getPopupContainer="trigger => trigger.parentNode" placeholder="请输入项目名称" :disabled="isShow" v-model:value="form.bidType" style="width: 100%"
                        :options="xmtypes"></a-select>

                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="预计开标日期" name="expectBidTime" :rules="[{ required: true }]">
                    <a-date-picker :getCalendarContainer="trigger => trigger.parentNode" valueFormat="YYYY-MM-DD hh:mm:ss" :disabled="isShow" v-model:value="form.expectBidTime"
                        style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <!-- <a-col :span="12">
                <a-form-item label="发起人" name="initiator" :rules="[{ required: true }]">
                    <a-input v-model:value="form.initiator" :disabled="isShow" style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col> -->
            <a-col :span="12">
                <a-form-item label="方案报价" name="bidPlanAmount" :rules="[{ required: true }]">
                    <a-input-number :precision="2" :min="0"  v-model:value="form.bidPlanAmount" :disabled="isShow" style="width: 100%"
                        placeholder="" />
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="是否为挂靠项目"  :rules="[{ required: true }]" name="isAttache">
                    <a-select :getPopupContainer="trigger => trigger.parentNode" v-model:value="form.isAttache" disabled style="width: 100%">
                        <a-select-option value="1">是</a-select-option>
                        <a-select-option value="0">否</a-select-option>
                    </a-select>
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
          
            <a-col :span="12">

            </a-col>
        </a-row>

        <a-row :gutter="16">
            <a-col :span="24">
                <a-form-item :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }" label="备注" name="remark">
                    <a-textarea v-model:value="form.remark" :disabled="isShow" :rows="4" placeholder=""
                        style="width: 100%" />
                </a-form-item>
            </a-col>
        </a-row>

        <!-- <a-row :gutter="16" class="mb-4">
            <a-col :span="4" class="text-right" style="font-weight: 600;">
                现场踏勘任务
            </a-col>
        </a-row>

        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="投标完成时间" name="completeDate">
                    <a-input v-model:value="form.completeDate" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="方案报价（元）" name="proposalQuota">
                    <a-input v-model:value="form.proposalQuota" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="投标方案负责人" name="bidDirector">
                    <a-input v-model:value="form.completeDate" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="投标方案" name="bidProposal">
                    <a-input v-model:value="form.bidProposal" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row> -->
        <a-row :gutter="16" class="mb-4">
            <a-col :span="4" class="text-right" style="font-weight: 600;">
                投标结果
            </a-col>
        </a-row>

        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="投标结果反馈人" name="bidFeedbacker">
                    <a-input v-model:value="form.bidFeedbacker" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="中标金额（元）" name="bidAmount">
                    <a-input v-model:value="form.bidAmount" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="投标结果" name="bidResult">
            
                    <a-select :getPopupContainer="trigger => trigger.parentNode" disabled v-model:value="form.bidResult" style="width: 100%">
                        <a-select-option value="1">中标</a-select-option>
                        <a-select-option value="0">未中标</a-select-option>
                    </a-select>
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="投标保证金金额（元）" name="bidBond">
                    <a-input v-model:value="form.bidBond" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="中标日期" name="bidWinTime">
                    <a-input v-model:value="form.bidWinTime" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        
        </a-row>
        <a-row :gutter="16" >
            <a-col :span="24">
                <a-form-item :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }" label="丢标原因" name="bidLostReason">
                    <a-textarea v-model:value="form.bidLostReason" disabled :rows="4" placeholder=""
                        style="width: 100%" />
                </a-form-item>
            </a-col>
        </a-row>
        <!-- <a-row :gutter="16" class="mb-4">
            <a-col :span="4" class="text-right" style="font-weight: 600;">
                系统信息
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="申请人" name="initiatorName">
                    <a-input v-model:value="form.initiatorName" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
            <a-col :span="12">
                <a-form-item label="申请时间" name="createTime">
                    <a-input v-model:value="form.createTime" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row>
        <a-row :gutter="16">
            <a-col :span="12">
                <a-form-item label="创建部门" name="deptName">
                    <a-input v-model:value="form.deptName" disabled style="width: 100%" placeholder="" />
                </a-form-item>
            </a-col>
        </a-row> -->
        <system :value="form" />
    </a-form>
</template>
<script setup>
import system from '@/components/Task/system.vue'

const form = ref({
});

import { xmtypes, tbtypes } from '@/utils/constants.js'
const show = (record) => {
  console.log("xminfo show",record)
  form.value={...record}
}
defineExpose({
    show,
})


const isShow = ref(true)

const handleFinish = () => { }
</script>